package com.zhentao.controller;

import com.github.pagehelper.PageInfo;
import com.zhentao.model.common.dtos.ResponseResult;
import com.zhentao.model.pay.dto.PayDto;
import com.zhentao.model.pay.vo.PayVo;
import com.zhentao.model.pay.vo.UserVipVo;
import com.zhentao.service.ApUserVipService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("api/v1/admin/pay/uservip")
@Api(tags = "UserVipController-用户会员状态管理")
public class UserVipController {

    @Resource
    ApUserVipService apUserVipService;

    /**
     * 用户会员时限列表
     * @param dto
     * @return
     */
    @PostMapping("/list")
    @ApiOperation("用户会员时限列表")
    public ResponseResult list(@RequestBody PayDto dto){
        PageInfo<UserVipVo> list = apUserVipService.getList(dto);
        return ResponseResult.okResult(list);
    }
}
